<template>
<h1 style="text-align: center;color: blueviolet;">用户信息</h1>
<table border="1" cellspacing="0" cellpadding="0" width="800" style="margin: 0 auto;">
    <tr>
        <th>用户编号</th>
        <th>用户姓名</th>
        <th>用户年龄</th>
        <th>用户性别</th>
        <th>用户身高 </th>
        <th>用户手机号</th>
    </tr>
    <tr v-for="item in users" :key="item.id">
        <td>{{ item.id }}</td>
        <td>{{ item.name }}</td>
        <td>{{ item.age }}</td>
        <td>{{ item.gender }}</td>
        <td>{{ item.height }}</td>
        <td>{{ item.phone }}</td>

    </tr>
</table>
</template>

<script>
export default {
    name:'uservue',
    data() {
        return {
            users: {
                id:'',
                name:'',
                age:'',
                gender:'',
                height:'',
                phone:'',
            }
        }
    },
    mounted () {
        this.$axios.get('http://127.0.0.1:8000/app/indexs/')
        .then((result) => {
            console.log(result.data);
            this.users=result.data;
        }).catch((err) => {
            console.log(err);
        });
    },


}
</script>

<style>

</style>